package com.itheima.hashSet;

import com.itheima.domain.Student;

import java.util.HashSet;

/*
HashSet 存储并遍历自定义对象

哈希值
equals结果
 */
public class Demo01 {


    public static void main(String[] args) {
        HashSet<Student> set = new HashSet<Student>();
        set.add(new Student("坤坤3",27));
        set.add(new Student("坤坤3",27));
        set.add(new Student("坤坤2",26));
        set.add(new Student("坤坤2",22));

        System.out.println(set);


    }
}
